package spring_introduction;

import org.springframework.stereotype.Component;

// this is modified id for Class Cat
//@Component("catBean")

//@Component // id bean = Cat --> cat
           // id bean = FavoriteSong --> favoriteSong

//@Component("catBean")  // this is modified id for Class Cat
public class Cat implements Pet {

    @Override
    public void say() {
        System.out.println("Meow-Meow");
    }

    public Cat(){
        System.out.println(this.getClass().getSimpleName() + " bean is created");
    }
}
